package com.essc.utils;

import java.io.Serializable;

//封装json返回给客户端的统一格式
public class JsonResult implements Serializable {
    private Integer state;//表示状态
    private String message;//表示封装的消息
    private Object data;//返回给客户端的数据

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMessage() {
        return message;
    }

    public void setMassage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }


    public JsonResult() {
    }

    public JsonResult(Integer state, String message) {
        this.state = state;
        this.message = message;
    }

    public JsonResult(String massage, Object data) {
        this.message = message;
        this.data = data;
    }

    public JsonResult(Integer state, Object data) {
        this.state = state;
        this.data = data;
    }

    public JsonResult(Integer state, String message, Object data) {
        this.state = state;
        this.message = message;
        this.data = data;
    }
}
